package com.lfy.config;

import com.lfy.modules.common.custom.ApplicationStart;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
@Component
public class SchedulerStart implements ApplicationStart {
    @Resource
    private Scheduler scheduler;
    @Override
    public void init() {
        try {
            scheduler.start();
        } catch (SchedulerException e) {
            e.printStackTrace();
        }
    }
}
